<?php defined('BASEPATH') OR exit('No direct script access allowed');

// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require APPPATH.'/libraries/REST_Controller.php';

class Timeline extends REST_Controller
{
    
    function users_get()
    {
		$this->load->model('wallmodel');
		$users = $this->wallmodel->getWall($this->get('id'));
        if($users)
        {
            $this->response($users, 200); // 200 being the HTTP response code
        }

        else
        {
            //$this->response(array('error' => 'Couldn\'t find any users!'), 404);

			$walls = $this->wallmodel->getAllWall();
			$this->response($walls,200);
        }

    }
}